home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / sq.arc / SQ.DOC next >
Text File  |  1984-12-29  |  6KB  |  135 lines

  1.  
  2. SQUEEZE/UNSQUEEZE   File compression routines.         March 15, 1984
  3.                               (SQPC161, USQLC10)
  4.  
  5. The squeeze/unsqueeze programs were originally deveolped for CP/M by
  6. Richard Greenlaw.  The squeeze program runs a data or program file through
  7. a rather complicated compression routine to produce a new file which is
  8. usually considerably smaller but can be used by the unsqueeze program to
  9. reproduce the original file, exactly.  The compression routines uses the
  10. Huffman algorithm which represents frequently occurring characters with
  11. fewer bits.  It is not necessary to know the internal details to use
  12. these programs.
  13.  
  14. Files found on bulletin boards and user libraries are often squeezed to
  15. conserve file space and reduce transmission time.  The exact percentage
  16. of compression depends on the data in the file, with documentation files
  17. ususally squeezing best.
  18.  
  19. Initial translations of the program to the IBM PC were slow, and did not
  20. work in all cases.  The current versions (SQPC161.EXE and USQLC10.COM)
  21. were translated as closely as possible from the CP/M versions, and work
  22. in all cases identically to the CP/M versions.    USQLC10 includes an
  23. error checking function, and will usually detect a file which was squeezed
  24. incorrectly by an older version of sq.com.
  25.  
  26. As a result of returning to the CP/M versions, some of the PC specific
  27. amenities (such as redirecting output to con:) were removed -- accuracy
  28. first!    A future version will put them back.
  29.  
  30. I suggest that you rename the files to SQ and USQ on your working copy, the
  31. version suffix is just so you'll recognize the new versions as they appear.
  32. The documentation always refers to them as SQ and USQ.
  33.  
  34.  
  35.                     Alan Losoff
  36.                     Milwaukee, Wisconsin
  37.  
  38.  
  39.  
  40.  
  41.  
  42. SQUEEZE/UNSQUEEZE     Squeezing Files                  page 2
  43. (SQPC161.EXE)                          March 15, 1984
  44.  
  45.  
  46. The squeeze program squeezes a file and produces a new output file with
  47. the 2nd letter of the file extension changed to "Q".  For example
  48.  
  49.     SQ  THING.BAS
  50.  
  51. creates a new file called THING.BQS.  The original filename is preserved as
  52. part of the squeezed file, as is all the information needed to recreate it.
  53. The ouput is to the default drive (in the DOS > prompt).
  54.  
  55. The output filename may not be varied, but an output drive may be specified.
  56. Thus
  57.     SQ  B:     THING.BAS
  58.  
  59. creates THING.BQS on drive B.  It reads the input from the default drive if
  60. no drive is specified on the file itself.  If THING.BQS already exists, it
  61. is overwritten.
  62.  
  63. Several filenames/drives may be specified on one command line.    They
  64. are processed in order.  Thus
  65.  
  66.     SQ  THING.BAS  WHAT.ASM  B:  WHO.DOC  A:  B:WHICH.ASM
  67.  
  68. squeezes THING.BAS and WHAT.ASM from the default drive to THING.BQS and
  69. WHAT.AQM on the same drive, then squeezes WHO.DOC from the default drive
  70. to WHO.DQC on drive b, and finally squeezes WHICH.ASM from drive b to
  71. WHICH.AQM on the default drive.
  72.  
  73.  
  74. If no parameters are given on the command line, SQ prompts for filenames
  75. (or drives) one at a time from the keyboard.  This allows you to enter
  76. filenames and drives after removing the disk containing SQ.  Also, using
  77. MSDOS redirection, you can enter filenames via a file or pipeline.
  78.  
  79. Restrictions:
  80.     The current version will only funtion with MSDOS 2.0 or higher, but
  81. paths are not supported.
  82.  
  83.  
  84.  
  85.  
  86.  
  87. SQUEEZE/UNSQUEEZE     Unqueezing Files                  page 3
  88. (USQLC10.COM)                          March 15, 1984
  89.  
  90.  
  91. The purpose of this program is to unsqueeze files created by SQ.COM,
  92. restoring them to their original condition.  This is a fast C version
  93. compiled with Lattice C.  It runs over 5 times as fast as the Pascal
  94. version on most IBM boards.  It also has error checking to detect files
  95. which were improperly squeezed by an old version of SQ.
  96.  
  97. You may specify as many input files on a command line as fit, the output
  98. filename is reconstructed from the squeezed data.  Output is to the
  99. default drive and path, but the drive may be changed by including a
  100. drive specification with no filename.  Path cannot be altered.
  101.  
  102. For example (assuming you have renamed it to USQ.COM)
  103.  
  104.     USQ  PROG1.CQM  B:PROG2.CQM  B:  PROG3.DQC
  105.  
  106. will unsqueeze prog1 and prog2 (from drive b:) to the default drive and
  107. prog3 to drive b:.  The new files will have the original name, most
  108. likely prog1.com, prog2.com and prog3.doc in this case.  If you already
  109. have a file by that name, it will be overwritten.
  110.  
  111. Two error messages are possible, UNEXPECTED EOF or CRC ERROR.  In either
  112. case some error has crept in due to copying or transmission, or
  113. the file was not properly squeezed in the first place. The resulting file
  114. is most likely unusable.  WARNING -- older versions of USQ do not check
  115. CRC, and may appear to unsqueeze a file correctly even if not.
  116.  
  117. Make sure you have enough disk space to handle the output file which could
  118. be over twice the size of the input file.  It is best to target your output
  119. to a blank diskette (or a temporary directory), since the output file name
  120. will be the name of the file originally squeezed, and may not be the name
  121. you expect.  (I clobbered a good file once, when I unsqueezed a program
  122. named BOB.DQC and the output file was MANUAL.DOC).  Future versions will
  123. give you the option of changing the ouput name.
  124.  
  125. Restrictions:
  126.      This program should work in version 1.1 or higher of MSDOS or PCDOS.
  127. It does not handle pathnames.
  128.  
  129.  
  130.  
  131. 
  132.  
  133. ons:
  134.      This program should work in version 1.1 or higher of MSDOS or PCDOS.
  135. It does not handle